home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / ShutDown.p < prev    next >
Text File  |  1996-05-01  |  2KB  |  99 lines

  1. {
  2.      File:        ShutDown.p
  3.  
  4.      Contains:    Shutdown Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT ShutDown;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __SHUTDOWN__}
  28. {$SETC __SHUTDOWN__ := 1}
  29.  
  30. {$I+}
  31. {$SETC ShutDownIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __MIXEDMODE__}
  38. {$I MixedMode.p}
  39. {$ENDC}
  40.  
  41. {$PUSH}
  42. {$ALIGN MAC68K}
  43. {$LibExport+}
  44.  
  45. {$IFC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE }
  46.  
  47. CONST
  48.     sdOnPowerOff                = 1;                            { call procedure before power off. }
  49.     sdOnRestart                    = 2;                            { call procedure before restart. }
  50.     sdOnUnmount                    = 4;                            { call procedure before unmounting. }
  51.     sdOnDrivers                    = 8;                            { call procedure before closing drivers. }
  52.     sdRestartOrPower            = 3;                            { call before either power off or restart. }
  53.  
  54.  
  55. TYPE
  56.     ShutDwnProcPtr = Register68kProcPtr;  { PROCEDURE ShutDwn(shutDownStage: INTEGER); }
  57.  
  58.     ShutDwnUPP = UniversalProcPtr;
  59.  
  60. CONST
  61.     uppShutDwnProcInfo = $00001002;
  62.  
  63. FUNCTION NewShutDwnProc(userRoutine: ShutDwnProcPtr): ShutDwnUPP;
  64.     {$IFC NOT GENERATINGCFM }
  65.     INLINE $2E9F;
  66.     {$ENDC}
  67.  
  68. PROCEDURE CallShutDwnProc(shutDownStage: INTEGER; userRoutine: ShutDwnUPP);
  69.     {$IFC NOT GENERATINGCFM}
  70.     {To be implemented:  Glue to move parameters into registers.}
  71.     {$ENDC}
  72. PROCEDURE ShutDwnPower;
  73.     {$IFC NOT GENERATINGCFM}
  74.     INLINE $3F3C, $0001, $A895;
  75.     {$ENDC}
  76. PROCEDURE ShutDwnStart;
  77.     {$IFC NOT GENERATINGCFM}
  78.     INLINE $3F3C, $0002, $A895;
  79.     {$ENDC}
  80. PROCEDURE ShutDwnInstall(shutDownProc: ShutDwnUPP; flags: INTEGER);
  81.     {$IFC NOT GENERATINGCFM}
  82.     INLINE $3F3C, $0003, $A895;
  83.     {$ENDC}
  84. PROCEDURE ShutDwnRemove(shutDownProc: ShutDwnUPP);
  85.     {$IFC NOT GENERATINGCFM}
  86.     INLINE $3F3C, $0004, $A895;
  87.     {$ENDC}
  88. {$ENDC}
  89. {$ALIGN RESET}
  90. {$POP}
  91.  
  92. {$SETC UsingIncludes := ShutDownIncludes}
  93.  
  94. {$ENDC} {__SHUTDOWN__}
  95.  
  96. {$IFC NOT UsingIncludes}
  97.  END.
  98. {$ENDC}
  99.